<template>
  <div>
      <div id="main-box"></div>
        <div id="main-content">
          <div class="login-body  animated fadeInLeft">
            <div class="login-main pr">
              <div class="login-form">
				  <img src="../../../static/images/LOGO-transparent.png" alt="">
                    <h3> 文化有限管理中心 </h3>
                    <h5 style="padding-bottom: 10px"> System Management Center </h5>
                     <div id="MobileBox" class="item-box">
                       <div class="input-group user-name"> <span class="input-group-addon"><i class="fa fa-user"></i></span>
                          <input type="text" name="username" class="form-control" v-model="loginForm.username" placeholder="用户名/手机号">
                          </div>
                     </div>
                     <div class="input-group password"> <span class="input-group-addon"><i class="fa fa-lock"></i></span>
                           <input type="password" name="password" class="form-control" v-model="loginForm.password" placeholder="密码">
                      </div>
                      <div class="login_btn_panel">
                            <button class=" btn btn-primary btn-block btn-lg" data-ajax="post" type="submit" data-callback="success" v-on:click="login">登录</button>
                            <div class="check-tips"></div>
                      </div>
                       </div>
              </div>
          </div>
      </div>
  </div>
</template>

<script>

export default {
  name: 'Login',
  data () {
    return {
      loginForm: {
        username: '',
        password: '',
      },
      responseResult: []
    }
  },
  methods: {
    login () {
      let username=this.loginForm.username;
      let password=this.loginForm.password;
      let url="/login?name="+username+"&password="+password;
      this.$axios
        .post(url)
        .then(successResponse => {
          if (successResponse.data.code === 200) {
            this.$router.replace({path: '/index'})
          } else {
            alert('登录失败！')
          }
        })
        .catch(failResponse => {
        })
    }
  }
}
</script>
</script>

<style>
  @import url("../../../static/css/font-awesome.css");
  @import url("../../../static/css/login.css");
  @import url("../../../static/css/animate.min.css");
  @import url("../../../static/css/zui.css");
  body { background-image: url(../../../static/images/4.jpg);}
  .copyrights{text-indent:-9999px;height:0;line-height:0;font-size:0;overflow:hidden;}
</style>
